﻿using System.Threading;

namespace SopCastRecorder
{
	public class Bot
	{
		public ScheduleInfo ScheduleInfo1 { get; set; }
		private SopCast SopCast1;
		public void Start()
		{
			this.SopCast1 = new SopCast();
			this.SopCast1.Start();
			this.SopCast1.SopCastBody1.AddressText = Channel.GetAddress(this.ScheduleInfo1.Channel);
			this.SopCast1.SopCastBody1.ClickGoButton();
			//msctls_progress32
			Thread.Sleep(OptionFile.Option1.Wait * 1000);
			this.SopCast1.SopCastPlayer1.ClickRecordButton();
			this.SopCast1.SopCastSaveDialog1.InputText = this.ScheduleInfo1.GetInputPath();
			this.SopCast1.SopCastSaveDialog1.ClickOkButton();
		}
		public void End()
		{
			this.SopCast1.SopCastPlayer1.ClickStopButton();
			this.SopCast1.SopCastBody1.Close();
		}
	}
}
